<?php
$config = array (
  'platform' => 'qiniu',
  'resource_cdn' => 'https://static.cnibx.cn',
  'resource_version' => '201906271321',
  'upload_config' => 
  array (
      '_default' => array (
      'fsizeMin' => '1',
      'fsizeLimit' => '104857600',
      'mimeLimit' => 'image/*;video/mp4;audio/*',
      'allowExts' => 'png,jpg,jpeg,gif,admin_cert,mp4,mp3,amr',
      'path' => 'tmp/{$date}/{$uniqid}.{$ext}',
    ),

      'reg_avatar' => array(
          'path' => 'admin/reg_avatar/thumb/{$uniqid}.{$ext}'
      ),
  ),
  'platform_config' => 
  array (
    'access_key' => '',
    'secret_key' => '',
    'bucket' => '',
    'root_path' => '',
    'base_url' => '',
  ),
);

$env = 'pro';

if (!empty($env))
{
    $path = \think\facade\App::getRootPath() .'config/'.$env.'/upload.php';

    if (file_exists($path))
    {
        $env_config = require_once $path;

        $config2 = array_merge($config, $env_config);

        $config2['upload_config'] = array_merge($config['upload_config'], $env_config['upload_config']);

        $config = $config2;
    }
}

return $config;